import { FC, Fragment } from "react";
import Hero from "../components/home-page/hero";
import FeaturedPosts from "../components/home-page/featured-posts";
import "../styles/globals.css";
interface Props {
  posts: {
    slug: string;
    title: string;
    excerpt: string;
    image: string;
    date: string;
  }[];
}

const HomePage: FC<Props> = (props) => {
  return (
    <Fragment>
      <Hero />
      <FeaturedPosts posts={props.posts} />
    </Fragment>
  );
};

export function getStaticProps() {
  return {
    props: {
      posts: [
        {
          slug: "11",
          title: "11",
          excerpt: "11",
          image: "不1.jpg",
          date: "11",
        },
        {
          slug: "22",
          title: "22",
          excerpt: "22",
          image: "不1.jpg",
          date: "11",
        },
        {
          slug: "33",
          title: "33",
          excerpt: "33",
          image: "不1.jpg",
          date: "11",
        },
      ],
    },
  };
}
export default HomePage;
